﻿#include "softinfodlg.h"
#include "ui_softinfodlg.h"
#include <QGraphicsDropShadowEffect>
#include <QFile>
#include <QTextStream>

SoftInfoDlg::SoftInfoDlg(QWidget *parent) :
    QDialog(parent),
    ui(new Ui::SoftInfoDlg)
{
    ui->setupUi(this);
    this->setAttribute(Qt::WA_DeleteOnClose);
    this->setWindowModality(Qt::ApplicationModal);
//    this->setWindowFlags(Qt::FramelessWindowHint);

    QFile dlg_qss(":/qss/dlg.qss");
    if (dlg_qss.open(QFile::ReadOnly))
    {
        QTextStream filetext(&dlg_qss);
        QString stylesheet = filetext.readAll();
        this->setStyleSheet(stylesheet);
        dlg_qss.close();
    }

    QGraphicsDropShadowEffect *shadow_effectA = new QGraphicsDropShadowEffect(this);

    shadow_effectA->setOffset(0, 0);
    shadow_effectA->setColor(QColor(150,150,150));
    shadow_effectA->setBlurRadius(6);

    QGraphicsDropShadowEffect *shadow_effectB = new QGraphicsDropShadowEffect(this);

    shadow_effectB->setOffset(0, 0);
    shadow_effectB->setColor(QColor(150,150,150));
    shadow_effectB->setBlurRadius(6);

    ui->SoftDlg_gBox->setGraphicsEffect(shadow_effectA);
    ui->soft_Title->setGraphicsEffect(shadow_effectB);
}

SoftInfoDlg::~SoftInfoDlg()
{
    delete ui;
}

